// FileName: size.ts
// ProjectName: miu-club
// 作者：区区电脑
// createTime: 2019/9/11

const baseW = 750;

const size = () => {
    let screenW = window.document.documentElement.clientWidth;
    if (screenW > baseW) {
        screenW = baseW;
    }
    let size = screenW / (baseW / 100);
// @ts-ignore
    document.getElementById('g-html').style.fontSize = size + 'px';
    window.onresize = () => {
        let screenW = window.document.documentElement.clientWidth;
        if (screenW > baseW) {
            screenW = baseW;
        }
        let size = screenW / (baseW / 100);
        // @ts-ignore
        document.getElementById('g-html').style.fontSize = size + 'px';
    };
};

export default size;
